package com.xuecheng.content.controller;

import com.xuecheng.commons.model.vo.ResponseResult;
import com.xuecheng.content.service.SmsService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;


@Slf4j
@RestController
public class SmsController {

    @Autowired
    private SmsService smsService;
    // 发送短信
    @GetMapping("/common/smsMsg")
    public ResponseResult sendSms(String phone){
        // 调用service发短信
        smsService.sendSms(phone);
        // 返回结果
        return ResponseResult.okResult();
    }
}
